﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="myorder.aspx.cs" Inherits="weikebuluo.wxgzpt.wechat.orderfood.myorder" %>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
   <link rel="stylesheet" type="text/css" href="styles/css/spoutlet/wei_canyin.css" media="all">
<link rel="stylesheet" type="text/css" href="styles/css/spoutlet/wei_dialog.css" media="all">
<link href="styles/css/plugins/datepicker/datepicker_canyin.css" rel="stylesheet" type="text/css"  media="all" />
<script type="text/javascript" src="styles/src/jQuery.js"></script>
<script type="text/javascript" src="styles/src/spoutlet/wei_webapp_v2_common.js"></script>
<script src="../../../Scripts/Su.common.js" type="text/javascript"></script>
<title>我的订单</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <meta name="format-detection" content="telephone=no" />
</head>
<body id="page_intelOrder" class="myOrderCon">
    <script>
        $(document).ready(function () {
            var min_height = $(document).height() - 80;
            $("#container").css({ "min-height": min_height });
        });
</script>
<div class="container">
    <header id="container">
        
        <div style="padding:10px 0;" id='list'>
                        <ul class="list_order">
                                <%if (dtorder.Rows.Count > 0)
                                  {
                                      for (int i = 0; i < dtorder.Rows.Count; i++)
                                      {%>
                                <li>
                    <label style="float:none;" onclick="this.classList.toggle('on');">订单号：<%=dtorder.Rows[i]["order_no"]%>&nbsp;订餐人：<%=dtorder.Rows[i]["order_name"]%>&nbsp;下单时间：<%=dtorder.Rows[i]["order_addtime"]%> </label>
                    <ol>
<%--                        <p>就餐地址：
                        上海市宝山区逸仙路2816号                        </p>
                                                <p>付款方式：到店支付</p>--%>
                        <table>
                            <thead>
                                <tr>
                                    <td colspan="3" style="font-size:16px;">我的菜单</td>
                                </tr>
                                <tr>
                                    <td style="width:33%">菜名</td>
                                    <td style="width:33%">单价</td>
                                    <td>数量</td>
                                </tr>
                            </thead>
                            <tbody>
                            <%if (dtorderfood[i].Rows.Count > 0)
                              {
                                  for (int j = 0; j < dtorderfood[i].Rows.Count; j++)
                                  {%>
                               <tr>
                                    <td><%=dtorderfood[i].Rows[j]["foodlist_name"]%></td>
                                    <td><%=dtorderfood[i].Rows[j]["foodlist_price"]%>元</td>
                                    <td><%=dtorderfood[i].Rows[j]["orderfood_num"]%>份</td>
                                </tr><%}
                              }%>
                                                            </tbody>
                            <tfoot>
                                <tr>
                                  <td colspan="2" style="text-align:right;">
                                        <label>总金额：<span class="red h5"><%=dtorder.Rows[i]["order_allprice"]%>元</span></label>
                                    </td>
                                </tr>
                            </tfoot>
                        </table>
                    </ol>
                </li>
                  <%}
                  }%>              
                               
                                
                            </ul>
                    </div>
    </header>

        <script>
            var footer = document.getElementById("footer_menu");
            var evtObj = {
                handleEvent: function (evt) {
                    if ("A" == evt.target.tagName) {
                        evt.target.classList.toggle("on");
                    }
                }
            }
            //            footer.addEventListener("touchstart", evtObj, false);
            //            footer.addEventListener("touchend", evtObj, false);

        </script>
</div>
<div id="footer_menu" class="footer footer_menu">
    <ul class="clear" style="position: inherit;">
                    <li><a href="choosefood.aspx?sid=<%=Request.QueryString["sid"] %>&wxid=<%=Request.QueryString["wxid"] %>"  ><span class="icons icons_2"></span><label>点菜</label></a></li>
                <li><a class="onactive" href="javascript:void(0);" ><span class="icons icons_3"></span><label>我的订单</label></a></li>
        <li><a href="myfood.aspx?sid=<%=Request.QueryString["sid"] %>&wxid=<%=Request.QueryString["wxid"] %>" id="my_menu"><span class="icons icons_5"><label id="num" class="num">0</label></span></a></li>
    </ul>
</div>
<script>
    $(document).ready(function () {
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            WeixinJSBridge.call('hideToolbar');
        });
        $('#my_menu').click(function () {
            addToMenu();

        });
    });

</script>
</body>
</html>
